package a12_ArrayListDemo;

/**
 * @Author quan
 * @Description 学生类(与TestDemo34对应)
 * @Date 2023/1/31 13:28
 */
public class Student {
    //1、私有化成员变量
    private String name;
    private int age;

    //2、构造方法（空参和带参）
    public Student() {
    }

    //3、get和set
    public Student(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

}
